<template>
  <div>
    <h2>Count</h2>
    <p>{{$store.state.num}}</p>
    <p>{{$store.getters.doubleNum}}</p>
    <button @click="increment">累加Num</button>
    <button @click="incrementN({n:2})">累加Num+n</button>
  </div>
</template>


<script>
import {mapMutations} from "vuex"
export default {
  name:"Count",
  methods:{
    ...mapMutations(["increment","incrementN"])
  }
}
</script>


<style></style>